<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:view>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Ranking de Viagens</title>
	</head>
	<body>
	<h:form>
	<rich:panel>
		<h:panelGrid columns="1">
			<h:column>
				<h:commandButton value="Nova Viagem" action="NEW" />
				<h:commandButton value="Nova Cidade" action="NEWCITY" />
				<h:commandButton value="Novo País" action="NEWCOUNTRY" />
			</h:column>
			<rich:messages />
			<rich:dataTable value="#{rankingAction.listTravels}" var="travel">
				<f:facet name="header">
					<rich:columnGroup>
						<rich:column>
							<h:outputText value="Lugar" />
						</rich:column>

						<rich:column>
							<h:outputText value="Impressões" />
						</rich:column>

						<rich:column>
							<h:outputText value="Nota" />
						</rich:column>
					</rich:columnGroup>
				</f:facet>
				<rich:column>
					<h:outputText value="#{travel.city.country.name} - #{travel.city.name}" />
				</rich:column>
				<rich:column>
					<h:outputText value="#{travel.opinion}" />
				</rich:column>
				<rich:column>
					<h:outputText value="#{travel.rank}" />
				</rich:column>
			</rich:dataTable>

		</h:panelGrid>
		</rich:panel>
	</h:form>
	</body>
</f:view>
</html>